package com.lkd.http.controller;

import com.lkd.feign.VmServiceFeignClient;
import com.lkd.vo.SkuVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/vm")
@Slf4j
public class AppVMController {
   @Autowired
    private VmServiceFeignClient vmServiceFeignClient;

    //消费者(小程序) --> feign--> 提供者(售货机) controller
    private List<SkuVO> skuList(@PathVariable("innerCode") String innerCode){
        return vmServiceFeignClient.findSkuListByInnerCode(innerCode);
    }


}